<template>
  <div>
    <section class="tt-qucik">
      <div class="tt-quick-box">
        <!-- 标题 -->
        <my-title><span>快速选择</span></my-title>
        <!-- 内容 -->
        <div class="box-list">
          <ul>
            <li v-for="item in home.fastList" v-bind:key="item.id">
              <router-link :to="{path : '/classifySearch',query:{id:item.id,name:item.text}}">
                <div class="pic"><img :src="item.path" alt="" /></div>
                <p class="txt">{{ item.text }}</p>
                <div class="line"></div>
              </router-link>
            </li>
          </ul>
        </div>
      </div>
    </section>
  </div>
</template>

<style lang="less" scoped>
@import "../../assets/less/variable.less";
.tt-qucik {
  margin-top: 2px;
  min-height: 120px;
  background-color: #fff;
  padding: @padding2;
  padding-top: 0;
  .tt-quick-box {
    width: 100%;
    min-height: 120px;
    overflow: hidden;
    // border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
  }
  .box-list {
    padding-bottom: 20px;
    overflow-x: auto;
    ul {
     width: 100px * 10;
     &::after {
         content: "";
         clear: both;
         display: block;
     }
      li {
          width: 90px;
          padding: 0 5px;
          //box-sizing: border-box;
          float: left;
      }
    }
    a {
      display: block;
      .pic {
        width: 90px;
        height: 100px;
        line-height: 100px;
        overflow: hidden;
        img {
            width: 90px;
            vertical-align: middle;
        }
      }
      .txt {
          text-align: center;
          font-size: 13px;
          padding-top: 5px;
          padding-bottom: 5px;
          border-left: 1px solid #f0f0f0;
          border-right: 1px solid #f0f0f0;
          background-color: #fff;
      }
      .line {
          width: 100%;
          height: 2px;
          background-color: #000;
      }
    }

    li {
        &:nth-of-type(1) , 
        &:nth-of-type(4) ,
        &:nth-of-type(7) {
             a {
                .line {
                    background-color: @bgColor2;
                }
            }
        }
        &:nth-of-type(2),
        &:nth-of-type(5),
        &:nth-of-type(8){
             a {
                .line {
                    background-color: @bgColor4;
                }
            }
        }
        &:nth-of-type(3),
        &:nth-of-type(6){
             a {
                .line {
                    background-color: @bgColor3;
                }
            }
        }
    }
  }
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
    opacity: 0;
}
</style>

<script>
import myTitle from "@/components/mytitle";
import { mapState } from 'vuex'
export default {
  components:{
      myTitle
  },
  computed: {
     ...mapState(['home'])
  }
};
</script>